<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
<h3 id="tt"></h3>
<script>
    //setTimeout(aa,5000);
    var i = 5;
    function aa(){
        document.getElementById('tt').innerHTML = i-- + "秒打开百度网页";
        if(i<=0) {
            location.href = 'http://www.baidu.com';
        }
    }
    aa();
    setInterval(aa,1000);
</script>
</body>
</html>